package com.yc.ssq.servlet;

import com.yc.ssq.dao.SsqDao;
import com.yc.ssq.util.Utils;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "ZztServlet", value = "/zzt.s")
public class ZztServlet extends HttpServlet {

    SsqDao dao = new SsqDao();

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String[] years = request.getParameterValues("year");
        String   month = request.getParameter("month");
        Utils.writeJson(dao.selectZzt(years,month),response);
    }
}
